Handling
Errors with Audio Functions
The
waveform-audio and auxiliary-audio functions return a nonzero value when an
error occurs. Windows provides functions that convert these error values into
textual descriptions of the errors. The application must still examine the
error values to determine how to proceed, but textual descriptions of errors
can be used in dialog boxes that describe errors to users.
You can use
the following functions to retrieve textual descriptions of audio error values:
Function |
Description |
waveInGetErrorText |
Retrieves a
textual description of a specified waveform-audio input error. |
waveOutGetErrorText |
Retrieves a
textual description of a specified waveform-audio output error. |
The only
audio functions that do not return error values are auxGetNumDevs waveInGetNumDevs , and waveOutGetNumDevs . These functions return
zero if no devices are present in a system or if they encounter any errors.